<?php
session_start();

	require("conn.php");
		if(!isset($_SESSION['User']))
{	
			header("Location:index.php");
	
		   
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
 <style type="text/css">
#text{
	margin-right:4px;
	float:left;
	font-size:16px;
	font-family:"Times New Roman", Times, serif;
	background:#CCC;
	width:200px;
	}
#field{
	float:left;
	width:100%;
	margin-bottom:2px;
	margin-top:10px;
	}
</style>
<script language="javascript" type="text/javascript">
var color;
function changeback(control)
{  
color=control.style.backgroundColor;
control.style.backgroundColor="#2FB056";
}
function changebre(control)
{  
control.style.backgroundColor=color;
}  

</script>
</head>

<body>
<div id="id_all">
	<div   id="id_top">
    	<div id="id_top_login">
        Xin chào <?php echo $_SESSION["User"];?>  |<a href="#">Đăng  xuất</a>
        </div>
    	<div id="id_top_menu">Quản lý nội dung</div>
    </div>
    
    <div id="id_cen">
    	<div id="id_cen_left">
        	
            	<div id="id_cen_left_box1_top">
                </div>
                
            
            <div class="class_box">
            	<div class="class_cen_box_top">
                	Danh Mục Quản Lý
                </div>
                <div class="class_cen_box_cen">
                 <p><a href="article">Quản lý bài viết</a></p>
                 <p><a href="image">Quản lý trang chủ</a></p>
                 <p><a href="section">Quản lý chuyên mục</a></p>
                 <p><a href="menu">Quản lý menu</a></p>
                 <p><a href="user">Quản lý người dùng</a></p>
                 <p><a href="rslist">Quản lý tài nguyên</a></p>
                 <?php if($_SESSION['Permit']==1)
                 echo "<p><a href='?man=user'>Danh má»¥c ngÆ°á»�i dÃ¹ng</a></p>";
				 ?>
                </div>
            </div>
          
        </div>
        <div id="id_cen_cen">
        	<?php
	if(isset($_GET["man"]))
	{
	  $ad=$_GET["man"];
		switch($ad)
		{
			//trong them vao
			case"article":
			include("listarticle.php");
			break;
			case"addarticle":
			include("addarticle.php");
			break;
			case"editarticle":
			include("editarticle.php");
			break;
			case"delarticle":
			include("delarticle.php");
			break;
			case "rslist":
			include ("listresource.php");
			break;
			case "rsa":
			include ("addresource.php");
			break;
			case "rse":
			include ("editresource.php");
			break;
			case "rsd":
			include ("delresource.php");
			break;
			//het
			
			case"menu":
			include("ListMenu.php");
			break;
			case"menue":
			include("MenuDT.php");
			break;
			case"menua":
			include("MenuAdd.php");
			break;
			
			case"section":
			include("ListSection.php");
			break;
			case"sectione":
			include("sectionDT.php");
			break;
			case"sectiona":
			include("SectionAdd.php");
			break;
			
			case"user":
			include("delarticle.php");
			break;
			
			
			
			default:
			echo "Trang web này không tồn tại!";
			break;
		}
	}
	else
	{
	 	echo "<h1 style='margin-left:200px'>Welcome IDG GROUP</h1>";
		
	}
	?>
	
            
            
            
            
            
        </div>
       
    </div>
    <div id="id_fot">
    </div>
</div>
</body>
</html>
